<template>
  <div>
    <v_header></v_header>
    <el-table :data="tableData" style="width: 100%">
      <el-table-column prop="bookID" label="图书名"> </el-table-column>
      <el-table-column prop="bookName" label="图书编号"> </el-table-column>
      <el-table-column prop="bookAuthor" label="图书作者"> </el-table-column>
      <el-table-column prop="bookPrice" label="图书价格"> </el-table-column>
      <el-table-column label="操作">
        <template slot-scope="scope">
          <el-button size="mini" @click="findBookInfo(scope.$index, scope.row)"
            >查看详情</el-button
          >
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
import v_header from "@/components/header.vue";
export default {
  data() {
    return {
      tableData: [
        {
          bookName: "潘嘎之交",
          bookID: "999",
          bookAuthor: "嘎子",
          bookPrice: "￥399",
          borrowData: "2016-05-02",
          forecastReturnData: "2016-05-02"
        }
      ],
      msg: "",
      msg1: "",
      token: ""
    };
  },
  components: {
    v_header: v_header
  },
  methods: {
    findBookInfo(index, row) {
      console.log(index, row);
      this.$router.push({ name: "bookinfo", params: { bid: row.bookID ,indexActive:"4"} });
    }
  }
};
</script>

<style></style>
